import { DataTypes } from "sequelize";
import sequelize from "./db";

export default sequelize.define('question_paper', {
  "id": {
    type: DataTypes.UUID,
    primaryKey: true,
    allowNull: false,
    defaultValue: DataTypes.UUIDV4,
  },

  'title': {
    type: DataTypes.STRING(255),
    allowNull: false,
  },

  'analyze': {
    type: DataTypes.STRING(255),
    allowNull: true,
  },

  'items': {
    type: DataTypes.STRING(255),
    allowNull: false,
  },

  'correct': {
    type: DataTypes.STRING(4),
    allowNull: false,
  },

  'score': {
    type: DataTypes.INTEGER,
    allowNull: false,
  },

}, {
  createdAt: false,
  updatedAt: false,
  freezeTableName: true
})